<?php

class Zend_View_Helper_formataNotaCor extends Zend_View_Helper_Abstract
{

    public static function formataNotaCor($nota)
    {
        if((int)$nota==0){$str='0';}
            elseif($nota<100){
                $str = sprintf("%01.1f", $nota);
            } else {$str = 100;}
       
        if($nota >=75){$cor="bom";}
        elseif($nota>=50){$cor = "medio";}
        else{$cor = "ruim";}

        return "<span class='".$cor."'>".$str."</span>";
   }
}
?>
